/*
	ACDM_buffer.h

	contains headers for buffer control functions

	Author: Aidan Goddard 23/10/13
*/

#ifndef ACDM_BUFFER_H_INCLUDED
#define ACDM_BUFFER_H_INCLUDED

#include"../../klib/headers/ktypes.h"
#include"../../kernel/headers/types.h"

// ribbon control
void RibbonSetup();
void UpdateRibbonTimeDate(int hours, int minutes, int day, int month, int year);
void UpdateRibbonCapsLock(int state);
void UpdateRibbonScrollLock(int state);
void UpdateRibbonNumLock(int state);
void UpdateBottomRibbonText(char *text);
void UpdateWindowName(char *text);

// buffer querying
HWND BufferGetHWND(int buffer);
uint64_t BufferGetPID(int buffer);
char *GetWindowName(int buffer);

// video buffer control
void UpdateVideoBuffer(int buffer);
void SwitchBuffer(int buffer);
void UpdateRibbons();

// static buffer control
void ChangeWindowName(int buffer, char *window_name, int name_count);
void StaticBufferCreate(int buffer, HWND hwnd, uint64_t PID, char *window_name, int name_count);
uint64_t GetStaticBufferAddress(int buffer);
void ClearBuffer(int buffer);
void ClearCharacters(int buffer);
void ClearBufferLine(int buffer, int line);
void ClearCharactersLine(int buffer, int line);
int WriteStringToBuffer(int buffer, int start_offset, char *in_buffer, ...);
int GenerateSubWindow(int buffer, int start_offset, int width, int height);
void SetCursor(int buffer, int pos, int state);


#endif
